<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>

    </style>
</head>

<body>

    <div id="box">


    </div>


    <script src="./js/react.js"></script>
    <script src="./js/react-dom.js"></script>
    <script src="./js/babel.min.js"></script>

    <script type="text/babel">

        class Person extends React.Component {
            constructor() {
                super();
                this.sex = "男";
            }

            render() {
                const name = "王义鑫";
                return (
                    <div>
                        <p>姓名:{name}</p>
                        <p>性别:{this.sex}</p>
                    </div>
                )
            }
        }


        const book = (<div>
            <h1>人的信息：</h1>
            {(new Person()).render()}
            <hr/>
            <Person />
        </div>
        );

        ReactDOM.render(book, document.getElementById("box"));


    </script>
</body>

</html>